package third;

import java.util.Scanner;

public class five_37 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n=input.nextInt();
        int ans=0,q=1;
        while(n!=0){
            ans+=(n%2)*q;
            q*=10;
            n/=2;

        }
        System.out.println(ans);
    }
}
